package Entities;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Item_Factura")
public class Entity_ItemFactura  implements Serializable{
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name = "id_item_factura")
	private int id;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_item_carta")
	private Entity_ItemCarta itemCarta;
	@Column
	private float precio;
	@Column
	private int cantidad;

	
	//GET & SET
	
	public float getPrecio() {
		return precio;
	}
	public void setPrecio(float precio) {
		this.precio = precio;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Entity_ItemCarta getItemCarta() {
		return itemCarta;
	}
	public void setItemCarta(Entity_ItemCarta itemCarta) {
		this.itemCarta = itemCarta;
	}
	public int getCantidad() {
		return cantidad;
	}
	public void setCantidad(int cantidad) {
		this.cantidad = cantidad;
	}
	
}
